The present invention relates generally to the field of virtualized storage systems, and more particularly, to pre-allocating resources and pre-caching virtual-to-physical mappings in thinly provisioned storage systems.
Thin provisioning is a virtualization method for optimizing storage allocation by presenting a logical address space that is larger than the physical storage actually available. Implementing thin provisioning on a storage system may, for example, present applications with an address space that represents 10 TB of storage when, in fact, there are only 2 TB of actual, physical, storage in the storage system. A storage controller may control a plurality of physical storage devices (hard disks, solid state disks, tapes, etc.) in the storage system and interface between the physical storage devices and logical address space presented to a user. A storage system that uses thin provisioning may be referred to herein as a thinly provisioned storage system.
A thinly provisioned storage system allocates the physical storage to the logical address space when data is actually written by an application for a first time to the logical address space. Thus, for example, a first WRITE operation to an address range in the logical address space alerts the storage controller that fresh physical storage must be allocated. The storage controller allocates enough physical storage to fulfill the WRITE operation, and associates the allocated physical storage with the logical address range. Data associated with the WRITE operation is then written to the logical address range, now backed by physical storage.
Physical storage is allocated to the logical address space in predefined block sizes. Hence, mapping between virtual and physical space requires separate map entries for each allocated block of physical storage. A “block,” as used herein, indicates a smallest extent or unit of allocatable physical storage space. Analogous terms used by different storage products include “allocation unit,” “storage extent,” “grain,” “chunk,” and “partition.” If a WRITE command requires less storage space than is allocated by block size, space efficiency can be lost. Though space efficiency can be gained with smaller block sizes, the map becomes increasingly large as block size is reduced. Take, for example, a block size of 8 k. The number of mapping entries for a 1 TB sized virtual disk would be 1 TB/8 k=227, or about 128 million entries. If each entry is 4 bytes, the total map size for the virtual disk is around 512 MB. If multiple virtual disks exist, the map size can easily run into multiple Gigabytes.